//#include <iostream>
//using namespace std;
//
////class base1
////{
////public:
////	base1() 
////	{
////		cout << "class base1" << endl;
////	}
////};
////class base2
////{
////public:
////	base2()
////	{
////		cout << "class base2" << endl;
////	}
////};
////class level1 :public base2, virtual public base1
////{
////public:
////	level1()
////	{
////		cout << "class level1" << endl;
////	}
////};
////class level2 :public base2, virtual public base1
////{
////public:
////	level2()
////	{
////		cout << "class level2" << endl;
////	}
////};
////class toplevel :public level1, virtual public level2
////{
////public:
////	toplevel()
////	{
////		cout << "class toplevel" << endl;
////	}
////};
////
////int main()
////{
////	toplevel obj;
////	
////	return 0;
////}
//
////**************************************************************
////
////class M {
////	int _m[2][3];
////public:
////	M(int a)
////	{
////		for (int i = 0; i < 2; i++)
////		{
////			for (int j = 0; j < 3; j++)
////			{
////				_m[i][j] = a;
////			}
////		}
////	}
////
////	M operator+(const M& m2)
////	{
////		M m(0);
////		for (int i = 0; i < 2; i++)
////		{
////			for (int j = 0; j < 3; j++)
////			{
////				m._m[i][j] = this->_m[i][j] + m2._m[i][j];
////			}
////		}
////		return m;
////	}
////
////	void print() const
////	{
////		for (int i = 0; i < 2; i++)
////		{
////			for (int j = 0; j < 3; j++)
////			{
////				cout << _m[i][j] << " ";
////			}
////			cout << endl;
////		}
////	}
////};
////
////int main()
////{
////	M m1(1), m2(2);
////	M m3 = m1 + m2;
////
////	m3.print();
////	return 0;
////}
////
////*************************************************************************
//
//class CShape {
//protected:
//	double _x, _y;
//public:
//	CShape(double x, double y)
//		:_x(x), _y(y) { }
//
//	virtual void Compute() = 0;
//};
//
//class Circle :public CShape {
//public:
//	Circle(double x):CShape(x,x){}
//	void Compute()
//	{
//		cout << "the area of circle is ";
//		cout << 3.14 * _x * _x << endl;
//	}
//};
//
//class Rectangle :public CShape {
//public:
//	Rectangle(double x, double y) :CShape(x, y){}
//	void Compute()
//	{
//		cout << "the area of rectangle is ";
//		cout << _x * _y << endl;
//	}
//};
//
//void DoCompute(CShape* pPointer)
//{
//	pPointer->Compute();
//}
//
//void DoCompute(CShape& shape)
//{
//	shape.Compute();
//}
//
//int main()
//{
//	Circle c(2);
//	Rectangle r(1, 2);
//
//	DoCompute(&c);
//	DoCompute(r);
//
//	return 0;
//}